using Godot;
using Microsoft.VisualBasic;
using System;
using System.Collections.Generic;
using System.Runtime;

public partial class WindowBase : Control
{
	public string viewName = "";

	public Dictionary<string, object> viewParamDict = new Dictionary<string, object>();

	public virtual void init()
	{
		this.addListener();
	}

	public virtual void onShow()
	{

	}

	public virtual void addListener()
	{

	}

	public virtual void close()
	{

	}

	public virtual void hide()
	{
		this.Visible = false;
	}

	public virtual void reShow()
	{
		this.Visible = true;
	}

	public virtual void destroy()
	{
		this.QueueFree();
	}

	public void closeThisWindow(Action callFunc = null)
	{
		ViewManager.getInstance().close(viewName, callFunc);
	}

}
